package com.Interface.pa;

public class testString {
    public static void main(String[] args) {
        String str1 = "xxxx";
        str1 += "yyy";

        StringBuffer str2 = new StringBuffer("qqqq");//线程安全
        str2.append("wwwww");

        StringBuilder str3 = new StringBuilder("eeeee");//非线程安全，StringBuffer的削弱版
        str3.append("rrr");

        System.out.println(str1);
        System.out.println(str2);
        System.out.println(str3);
    }
}
